package cn.iocoder.yudao.module.wms.controller.admin.rdrecord11.vo;

import cn.iocoder.yudao.module.wms.dal.dataobject.inventory.InventoryDO;
import cn.iocoder.yudao.module.wms.dal.dataobject.location.LocationDO;
import cn.iocoder.yudao.module.wms.dal.dataobject.unit.UnitDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 材料出库子 VO
 *
 * @author 曾劲松
 */
@Data
@ExcelIgnoreUnannotated
public class Rdrecords11RespVO implements VO {

    /**
     * id
     */
    @TableId
    private Long id;
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 来源订单id
     */
    private Long sourceOrderId;
    /**
     * 存货id
     */
    @Trans(type = TransType.SIMPLE, target = InventoryDO.class, fields = {"code","name","specModel"}, refs = {"inventoryCode","inventoryName","specModel"})
    private Long inventoryId;

    @Schema(description = "存货编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存货编码")
    private String inventoryCode;

    @Schema(description = "存货名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存货名称")
    private String inventoryName;

    @Schema(description = "规格型号")
    @ExcelProperty("规格型号")
    private String specModel;

    @Schema(description = "计量单位id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20436")
    @Trans(type = TransType.SIMPLE, target = UnitDO.class, fields = "name", ref = "unitName")
    private Long unitId;

    @Schema(description = "计量单位名称")
    @ExcelProperty("计量单位")
    private String unitName;
    /**
     * 货位id
     */
    @Trans(type = TransType.SIMPLE, target = LocationDO.class, fields = "name", ref = "locationName")
    private Long locationId;

    @Schema(description = "货位", example = "存货名称")
    @ExcelProperty("货位")
    private String locationName;
    /**
     * 批号
     */
    private String batch;
    /**
     * 可用量
     */
    private Double availableAmount;
    /**
     * 数量
     */
    private Double quantity;
    /**
     * 单价
     */
    private BigDecimal price;
    /**
     * 金额
     */
    private BigDecimal money;
    /**
     * 备注
     */
    private String remark;
    /**
     * 来源批号
     */
    private String sourceBatch;

}